<!DOCTYPE html>
<html lang="en">
<!--4月1号以后的非osw的 owner 协议-->

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=no" />
    <title>Mandatory Declaration</title>
    <link href="../css/common.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body,
        div,
        dl,
        dt,
        dd,
        ul,
        ol,
        li,
        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        pre,
        code,
        form,
        fieldset,
        legend,
        input,
        texarea,
        p,
        blockquote,
        th,
        td {
            margin: 0px;
            padding: 0px;
        }
        
        body {
            overflow-x: hidden;
            font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
            font-weight: normal;
            line-height: 1.5;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            background-color: #f8f8f8;
        }
        
        div,
        p {
            word-wrap: break-word;
        }
        
        .container {
            padding: 16px;
            background-color: #f8f8f8;
            margin-bottom: 64px;
        }
        
        .text {
            font-size: 15px;
            font-weight: 400;
            line-height: 20px;
            opacity: 1;
            color: #444444;
        }
        
        .textColorTitle {
            color: #b3b7be;
        }
        
        .topMargin10 {
            margin-top: 10px;
        }
        
        .textBold {
            font-weight: bold;
            color: #444444;
        }
        
        .bottomBar {
            width: 100%;
            position: fixed;
            bottom: 0;
            background-color: #ffffff;
        }
        
        input[type="image"] {
            -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
            -webkit-user-select: none;
            -moz-user-focus: none;
            -moz-user-select: none;
            -webkit-appearance: none;
            outline: none;
            border: none;
        }
        
    </style>
</head>

<body>
    <div>
        <div class="container text">
            <p class="textColorTitle" style="padding-left: 19px">
                Please scroll down and read it carefully. If the information provided has been changed on GreenDeal, you'll need to re-sign the statement.
            </p>
            <div class="card">
                <p>I <span id="owner_name_container">(<span id="input_owner_name" class="textBold">Insert owner name</span>)</span> am the owner of the Small Generation Unit (SGU) mentioned in the STC Assignment Form and I agree to assign my right to create
                    STCs to
                    <span class="textBold" id="agent_name">(Insert Name of Registered Agent)</span> (in its capacity as a registered agent) for a period of
                    <span class="textBold" id="deeming_period">(insert deeming period)</span> years commencing
                    <span class="textBold" id="installation_date">(insert installation date)</span>.
                </p>
                <p>I have not previously assigned or created any STCs for this system. lunderstand that this system is eligible for <span class="textBold" id="agent_name">(Insert Name of Registered Agent)</span> STCs,and l assign all my existing and future rights, title and interest in the STCs to One Stop Warehouse Finance Pty Ltd at a priceequal to the promotional or contracted rate for STCs as at the day of trading (or such other agreed amount). l furtherassign the benefit of the payment l am entitled to receive as consideration for the assignment of the STCs to the applicableinstaller or retailer that sold me the system.
                <p class="topMargin10">I have not previously assigned or created any STCs for this system. I understand that this system is eligible for
                    <span class="textBold" id="insert_numbers"> (insert number)</span> STCs, and in exchange for assigning my right to create STCs I will receive a
                </p>
                <div class="textBold topMargin10">
                    <a class="textBold" id="pay_type">(Please select)</a><br />
                    <form name="pay_type_form" style="margin-left: 20px;">
                        <br />
                        <label onclick="onCheckedChange1()"><input class="redInput" type="radio" name="type" value="Discount">&nbsp;Discount</label><br /><br />
                        <label onclick="onCheckedChange1()"><input class="redInput" type="radio" name="type" value="Credit memo">&nbsp;Credit memo</label><br /><br />
                        <label onclick="onCheckedChange1()"><input class="redInput" type="radio" name="type" value="Cash payment">&nbsp;Cash payment</label><br />
                    </form>
                </div>
                <p style="margin-top: 10px;">from <span class="textBold" id="company_name">(company name of the installer / retailer)</span>.</p>
                <p style="margin-top: 10px;">I further declare that the accredited CEC installer named on this form physically attended the installation of the unit.</p>
                <p style="margin-top: 10px;">I understand that agent(s) from the Clean Energy Regulator, or <span class="textBold" id="agent_name1">(Insert Name of Registered Agent)</span> may request to inspect the SGU at any time.</p>
                <p style="margin-top: 10px;">I am aware that I have to retain proof of the installation for the life span of the STCs.</p>
                <p style="margin-top: 10px;">I am aware that penalties can be applied for providing false or misleading information in this form under the Renewable Energy (Electricity) Act 2000.</p>
                <p class="topMargin10" style="font-weight: bold">
                    - I agree to this device (GreenDeal App) taking a photo of me while I sign off to verify my identity, and I authorise and appoint <span id="agent_name2">(Insert Name of Registered Agent)</span> as my agent to make any updates to this form which are required to allow for it to be duly processed.
                </p>
                <p class="topMargin10" style="font-weight: bold">
                - I acknowledge that this declaration may be signed by electronic signature using a third-party online document execution service nominated by <span id="agent_name3">(Insert Name of Registered Agent)</span>.  By signing this declaration electronically, I:
                </p>
                <p class="topMargin10" style="font-weight: bold">
                • represent and warrant to <span id="agent_name4">(Insert Name of Registered Agent)</span> that I have been duly authorised to sign this declaration electronically, I have affixed my own electronic signature and that I hold the position or title indicated under the electronic signature; and
                </p>
                <p class="topMargin10" style="font-weight: bold">
                • indemnify <span id="agent_name5">(Insert Name of Registered Agent)</span> for any liability or loss arising from or in connection with as a result of the abovementioned warranties being untrue.
                </p>
            </div>
        </div>
        <div class="bottomBar">
            <div class="summitDiv">
                <button type="button" class ="summitButton" onclick="submit()">I Agree & Continue</button>
    <!--                <input type="image" src="../images/btn_agree_sign.png" style="width: 164px;height: 64px;" onclick="submit()" />-->
            </div>
        </div>
    </div>
</body>
<script type="text/javascript" src="../javascripts/platform.js"></script>
<script language="javascript">
    function onCheckedChange1() {
        var modify = document.getElementById("pay_type")
        modify.style.color = "#444444"
    }

    function init_data(jsonData) {
        if (jsonData.owner_address.type.toLowerCase() == "individual") {
            document.getElementById("input_owner_name").innerText = jsonData.owner_address.type_name;
        } else {
            document.getElementById("owner_name_container").style.display = "none"
        }
        document.getElementById("deeming_period").innerText = jsonData.system_detail.deemed_years
        document.getElementById("installation_date").innerText = jsonData.system_detail.installation_date
        document.getElementById("insert_numbers").innerText = jsonData.system_detail.rec_quantity
        document.getElementById("agent_name").innerText = jsonData.agent_name
        document.getElementById("agent_name1").innerText = jsonData.agent_name
        document.getElementById("agent_name2").innerText = jsonData.agent_name
        document.getElementById("agent_name3").innerText = jsonData.agent_name
        document.getElementById("agent_name4").innerText = jsonData.agent_name
        document.getElementById("agent_name5").innerText = jsonData.agent_name
        document.getElementById("company_name").innerText = jsonData.company
    }
    function add_input_params(jsonData) {
        let local = getLocalParam('inputparam');
        local['owner_full_name'] = jsonData.signatures.owner_type_name;
        local['deemed_years'] = jsonData.system_detail.deemed_years;
        local['installation_date'] = jsonData.system_detail.installation_date;
        local['rec_quantity'] = jsonData.system_detail.rec_quantity;
        local['agent_name'] = jsonData.agent_name;
        local['company'] = jsonData.company;
        addParamToLocal('inputparam',local)
    }
    function hide_owner_name() {
        document.getElementById("owner_name_container").style.display = "none"
    }

    function get_radio_select_value() {
        var modify = document.getElementById("pay_type");
        var pay_type_value = pay_type_form.type.value.toString();
        if (pay_type_value == "") {
            modify.style.color = "#e41919";
            modify.scrollIntoView();
            return;
        } else {
            modify.style.color = "#444444";
        }
        return pay_type_value;
    }

    function to_installer_witness() {
        myJsBridge.skip_to_installer_witness();
    }

    //android 初始化
    var data;

    function init_pvd_detail(detail) {
        data = detail;
        init_data(data);
        add_input_params(data);
    }

    let doc_version = "3";

    function submit() {
        let pay_type_value = get_radio_select_value();
        if (pay_type_value == null) {
            return;
        }

        let local = getLocalParam('param');
        local["owner_statement_version"] = doc_version;
        local["financial_incentive"] = pay_type_value;

        addParamToLocal('param',local);
        window.location.href = "../owner/owner_onsite_signature_v2.html";
    }

    function getLocalParam(paramName) {
        var local = localStorage.getItem(paramName);
        if (local != "" && local != null && local != undefined) {
            console.log(local)
            return JSON.parse(local);
        } else {
            return {};
        }
    }

    function addParamToLocal(paramName,dictionary) {
        localStorage.setItem(paramName, JSON.stringify(dictionary));
    }
    
    if (isAndroid) {
        let json = myJsBridge.initData();
        init_pvd_detail(JSON.parse(json));
    }

    if (isIos) {
        window.webkit.messageHandlers.event.postMessage({
            "event": "getPvddetail"
        });
    }
</script>

</html>
